﻿@model BillBox.Models.User

@{
    ViewBag.Title = "View User";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


<div class="row main">
    <div class="col-lg-12">
        <ol class="breadcrumb">
            <li>@Html.ActionLink("Home", "Index", "Default")</li>
            <li>@Html.ActionLink("Users", "Index", "User")</li>
            <li class="active">View User</li>
        </ol>
        <!--<h1 class="page-header">View Agent</h1>-->
        <div class="panel panel-default">
            <div class="panel-heading">
                User Information
            </div>
            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover">
                        <thead>
                            <tr>
                                <th>
                                    @Html.DisplayNameFor(model => model.Name)
                                </th>
                                <th>
                                    @Html.DisplayNameFor(model => model.Username)
                                </th>
                                <th>
                                    @Html.DisplayNameFor(model => model.AddressStreet)
                                </th>
                                <th>
                                    @Html.DisplayNameFor(model => model.ContactNumber)
                                </th>
                                <th>
                                    @Html.DisplayNameFor(model => model.EmailAddress)
                                </th>
                                <th>
                                    @Html.DisplayNameFor(model => model.Agent.Name)
                                </th>
                                <th>
                                    @Html.DisplayNameFor(model => model.AgentBranch.Name)
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>

                                <td>
                                    @Html.DisplayFor(model => model.Name)
                                </td>


                                <td>
                                    @Html.DisplayFor(model => model.Username)
                                </td>


                                <td>
                                    @Html.DisplayFor(model => model.AddressStreet)
                                    <br />
                                    @Html.DisplayFor(model => model.AddressCity)
                                    @if (Model.Parish != null)
                                    {
                                        <br />                 
                                        @Html.DisplayFor(model => model.Parish.Name)
                                    }
                                </td>


                                <td>
                                    @Html.DisplayFor(model => model.ContactNumber)
                                </td>



                                <td>
                                    @Html.DisplayFor(model => model.EmailAddress)
                                </td>

                                <td>
                                    @if (Model.Agent != null)
                                    {

                                        @Html.DisplayFor(model => model.Agent.Name)
                                    }
                                </td>
                                <td>
                                    @if (Model.AgentBranch != null)
                                    {
                                        @Html.DisplayFor(model => model.AgentBranch.Name)
                                    }
                                </td>
                            </tr>
                        </tbody>

                    </table>
                </div>
            </div>
            <div class="panel-footer">
                <ul class="details-menu">
                    <li>@Html.ActionLink("Edit", "Edit", new { id = Model.UserId }, new { @class = "btn btn-default" })</li>
                </ul>
            </div>
        </div>
    </div>
    <!-- /.col-lg-12 -->
</div>
